package myEasyExcelDemo.impModel;
import java.util.ArrayList;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author changfu.he
 * @date 2021/9/6
 */
@Data
public class EntityModel {
    @ExcelProperty("姓名")
    private String  empName;

    @ExcelProperty("部门")
    private String  depName;

    @ExcelProperty("角色")
    private String  roleName;

    @ExcelProperty("手机号码")
    private String  phone;

    @ExcelProperty("密码")
    private String  pwd;

    @ExcelProperty("身份证号")
    private String  idNo;

    public static List<EntityModel> initSizeModel(int size){
        List<EntityModel> entityModellist=new ArrayList<>(size);
        EntityModel entityModel = initObj();
        for(int i=0; i< size; i++){
            entityModellist.add(entityModel);
        }
        return entityModellist;
    }

    public static EntityModel initObj(){
        EntityModel entityModel = new EntityModel();
        entityModel.setEmpName("");
        entityModel.setDepName("");
        entityModel.setRoleName("");
        entityModel.setPhone("");
        entityModel.setPwd("");
        entityModel.setIdNo("");
        return entityModel;
    }
}






